home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Cream of the Crop 22
/
Cream of the Crop 22.iso
/
doom
/
server_1.zip
/
_KCKSCDR.QC
< prev
next >
Wrap
Text File
|
1996-10-04
|
2KB
|
72 lines
/*
**
** _kckscdr.qc (KickSuicider Code , 1.3)
**
** Copyright (C) 1996 Johannes Plass
**
** This program is free software; you can redistribute it and/or modify
** it under the terms of the GNU General Public License as published by
** the Free Software Foundation; either version 2 of the License, or
** (at your option) any later version.
**
** This program is distributed in the hope that it will be useful,
** but WITHOUT ANY WARRANTY; without even the implied warranty of
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
** GNU General Public License for more details.
**
** You should have received a copy of the GNU General Public License
** along with this program; if not, write to the Free Software
** Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
**
** Author: Johannes Plass (plass@dipmza.physik.uni-mainz.de)
**
*/
void(entity player) KickSuiciderInit =
{
if (!USE_MODULE_KICKSUICIDER) return;
// nothing to be done here.
// player.kick_suicider_lasttime is initialized in
// function PutClientInServer() in client.qc
};
void(entity player) KickSuiciderInfo =
{
local string limit;
if (!USE_MODULE_KICKSUICIDER) return;
// 123456789#123456789#123456789#12345678
sprint(player,"£");
sprint(player," KickSuicider");
sprint(player, " kicks you if suiciding\n");
sprint(player," 2 times within 2 minutes.\n");
};
void(entity player) KickSuiciderActiveMessage =
{
if (!USE_MODULE_KICKSUICIDER) return;
// 123456789#123456789#123456789#12345678
sprint(player," KickSuicider\n");
};
float(entity player) KickSuicider =
{
if (!USE_MODULE_KICKSUICIDER) return;
if (time < player.kick_suicider_lasttime + 120) {
if (USE_MODULE_SERVERCONSOLE) { //#jp#(ServerConsole)
dprint("Kicking "); //#jp#(ServerConsole)
dprint(player.netname); //#jp#(ServerConsole)
dprint(" for suiciding\n"); //#jp#(ServerConsole)
} //#jp#(ServerConsole)
sprint (player,"Suiciders suck, you are kicked.\n");
stuffcmd(player,"disconnect\n");
return(1);
}
player.kick_suicider_lasttime = time;
return(0);
};